// by Jens Schmidt 2009
// for: YOU
// use, modify, copy this as you like

function ViewImageAssistant(filename) {
	this.filename=filename;
}

ViewImageAssistant.prototype.setup = function(){
	this.imageViewerWidget = this.controller.get('imageViewer');

	this.controller.setupWidget(Mojo.Menu.appMenu,
       	this.attributes = {
                omitDefaultItems: true
            },
    	this.model = {
        visible: true,
        items: []
		});	
	
	this.viewerAttributes = {
		noExtractFS: true,
		highResolutionLoadTimeout: 3,
		limitZoom: false
	};
	this.viewerModel = {};
	this.controller.setupWidget('imageViewer', this.viewerAttributes, this.viewerModel);
}

ViewImageAssistant.prototype.activate = function(event) {
	this.imageViewerWidget.mojo.centerUrlProvided(this.filename);
	this.imageViewerWidget.mojo.manualSize(320, 480);
}

ViewImageAssistant.prototype.deactivate = function(event) {

}

ViewImageAssistant.prototype.cleanup = function(event) {
}
